package cn.yeamin.order.controller;

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import cn.yeamin.order.service.OrderService;
import cn.yeamin.order.vo.Order;

@RestController
public class OrderController {
	private static final Logger log = org.slf4j.LoggerFactory.getLogger(OrderController.class);
	
	@Autowired
	private OrderService orderService;
	
	@GetMapping(value = "order/{orderId}")
	public Order queryOrderById(@PathVariable("orderId") String orderId,HttpServletRequest req) {
		log.info("order===================>>>>>{}",req.getHeader("token"));
		return this.orderService.queryOrderById(orderId);
	}


}
